
<div id="foodarticle-add-edit">

    <div class="title">
        修改食材百科
    </div>

    <div class="content">

        <form action="__APP__/FoodArticle/update" method="post">

            <input type="hidden" name="image" class="pic" value="<{$data.image}>" readonly="readonly" />
            <input type="hidden" name="id" value="<{$data.id}>" />
            <table>

                <tr>
                    <th>所属栏目：</th>

                    <td>

                        <select name="sectionid" class="foodsectionid">
                            <option value="0">---请选择所属栏目---</option>
                            <volist name="foodsection" id="vo">
                                <eq name="data.sectionid" value="$vo.id">
                                        <option value="<{$vo.id}>" selected="selected"><{$vo.name}></option>
                                    <else/>
                                        <option value="<{$vo.id}>"><{$vo.name}></option>
                                </eq>
                            </volist>
                        </select>　

                        <strong>所属分类：</strong>
                        <select name="categoryid" class="foodcategoryid">
                            <option value="0" selected="selected">---请选择所属分类---</option>
                            <volist name="foodcategory" id="vo">
                                <eq name="data.categoryid" value="$vo.id">
                                    <option value="<{$vo.id}>" selected="selected"><{$vo.name}></option>
                                    <else/>
                                    <option value="<{$vo.id}>"><{$vo.name}></option>
                                </eq>
                            </volist>
                        </select>　

                    </td>

                </tr>

                <tr>
                    <th>食材名称：</th><td><input type="text" class="text" name="name" value="<{$data.name}>" /></td>
                </tr>

                <tr>
                    <th>食材别名：</th><td><input type="text" class="text" name="alias" value="<{$data.alias}>" /></td>
                </tr>

                <tr>
                    <th>
                        是否发布：
                    </th>
                    <td>
                        <eq name="data.publish" value="1">
                                <input type="radio" checked="checked" name="publish" value="1" />是
                                <input type="radio" name="publish" value="0" />否　
                            <else/>
                                <input type="radio"  name="publish" value="1" />是
                                <input type="radio" checked="checked" name="publish" value="0" />否　
                        </eq>
                        <strong>排序：</strong>
                        <input style="width:200px;" type="text" class="text" name="sort" value="0" />　　
                    </td>
                </tr>
                <tr>
                    <th class="top"><a href="javascript:;" class="upload">上传图片：</a></th>
                    <td style="height:210px;" class="img">
                        <empty name="data.image">
                                <img style="float: left;" src="__PUBLIC__/Content/FoodArticle/default.jpg" />
                            <else/>
                                <img style="float: left;" src="__PUBLIC__/Content/FoodArticle/<{$data.image}>" />
                        </empty>
                        <div class="unit">
                            <p><strong>请选择该食材所用单位,并填写对应单位的初始克数</strong><input type="button" class="selectall" style="margin-left: 5px;" name="" value="全选/取消" /></p>
                            <ul>
                                    <volist name="fooddealinfo" id="vo">
                                            <li>
                                                <input type="checkbox" name="unit[]" checked="checked" value="<{$vo.unit}>" />
                                                <span style="margin-left: 5px;width:50px;">1 <{$vo.setdeal.name}>&nbsp;&nbsp;=></span>
                                            <span style="float: right;margin-right: 10px;">
                                                <input type="text" name="deal[]" value="<{$vo.deal}>" />g
                                            </span>
                                            </li>
                                    </volist>
                                <volist name="dealinfo" id="vo">
                                    <li><input type="checkbox" name="unit[]" value="<{$vo.id}>" /><span style="margin-left: 12px;width:50px;">1 <{$vo.name}>&nbsp;&nbsp;=></span><span style="float: right;margin-right: 10px;"><input type="text" disabled="disabled" name="deal[]" value="0" />g</span></li>
                                </volist>
                            </ul>
                        </div>
                    </td>
                </tr>
                <tr><th class="top">食材描述：</th><td><textarea name="description" class="textarea" ><{$data.description}></textarea></td></tr>
                <tr><th class="top">食量建议：</th><td><textarea name="suggest" ><{$data.suggest}></textarea></td></tr>
                <tr><th class="top">适宜人群：</th><td><textarea name="suitable" ><{$data.suitable}></textarea></td></tr>
                <tr><th class="top">禁忌人群：</th><td><textarea name="taboo" ><{$data.taboo}></textarea></td></tr>
                <tr><th class="top">营养价值：</th><td><textarea name="nutrition" ><{$data.nutrition}></textarea></td></tr>
                <tr><th class="top">食用效果：</th><td><textarea name="effect" ><{$data.effect}></textarea></td></tr>
                <tr><th class="top">食用禁忌：</th><td><textarea name="edibletaboo" ><{$data.edibletaboo}></textarea></td></tr>
                <tr><th class="top">选购方法：</th><td><textarea name="choose" ><{$data.choose}></textarea></td></tr>
                <tr><th class="top">烹饪技巧：</th><td><textarea name="technique" ><{$data.technique}></textarea></td></tr>
                <tr><th class="top">存储方法：</th><td><textarea name="storage" ><{$data.storage}></textarea></td></tr>
                <tr><th></th><td><input type="submit" class="submit" value="修改食材" />　　<input type="reset" value="清空重填" /></td></tr>

            </table>

        </form>

    </div>
</div>
<script type="text/javascript" src="../Public/js/foodarticle.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ajaxupload.js"></script>
